<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="../../../../assets/css/reset.css"/>

    <link rel="stylesheet" href="../../../../assets/css/examples.css"/>

</head>
<body>
<h1>
    Request
</h1>
<ul>
    <li>
        <a href="javascript:void(0)" id="dataTimeY">打开选择时间Y</a>
    </li>
    <li>
        <a href="javascript:void(0)" id="dataTimeYm">打开选择时间Y-m</a>
    </li>
    <li>
        <a href="javascript:void(0)" id="dataTimeMd">打开选择时间m-d</a>
    </li>
    <li>
        <a href="javascript:void(0)" id="dataTimeYmd">打开选择时间Y-m-d</a>
    </li>

     <li>
        <a href="javascript:void(0)" id="openDetail">打开拨盘</a>
    </li>
</ul>

<script  src="../../../../../core/$$.js"></script>
<script  src="../../../../../core/libs/zepto/zepto.min.js"></script>
<script  src="../../../../../core/libs/zepto/selector.js"></script>
<script  src="../../../../../core/libs/zepto/touch.js"></script>
<script  src="../../../../../core/libs/underscore-min.js"></script>
<script  src="../../../../../core/libs/oop.js"></script>
<script  src="../../../../../core/extend/prototype.js"></script>
<script  src="../../../../../core/extend/function.js"></script>
<script  src="../../../../../core/native/platformAdapter.js"></script>
<script  src="../../../../../core/native/api.js"></script>
<script  src="../../../../../core/native/eventListener.js"></script>
<script  src="../../../classes/XX.js"></script>
<script  src="../../../classes/common.js"></script>
<script  src="../../../../config/url/dev.js"></script>

<script type="text/javascript">
    window.onerror = function (msg, url, line) {
        alert('- ' + msg + '\n- ' + url + '\n- ' + line);
        return true;
    }

    $('#dataTimeY').on('tap', function () {
       console.log("dataTimeY");
        $$.Native.selectDate({
            format:"Y",
            completeValue : "2014",
            completeCallback : function(data){
                $$.Native.alert({text:("Y:" + data)});
            }
        });
    });
    $('#dataTimeYm').on('tap', function () {
       console.log("dataTimeYm");
        $$.Native.selectDate({
            format:"Y-m",
            completeCallback : function(data){
                $$.Native.alert({text:("Y-m:" + data)});
            }
        });
    });
    $('#dataTimeMd').on('tap', function () {
       console.log("dataTimeMd");
        $$.Native.selectDate({
            format:"m-d",
            completeValue : "03-05",
            completeCallback : function(data){
                $$.Native.alert({text:("m-d:" + data)});
            }
        });
    });
    $('#dataTimeYmd').on('tap', function () {
       console.log("dataTimeYmd");
        $$.Native.selectDate({
            format:"Y-m-d",
            type:"1",
            startValue:"2015-05-02",
            startCallback:function(data){
               $$.Native.alert({text:("Y-m-d:" + data)});
            },
            completeValue:"2015-05-06",
            completeCallback : function(data){
                $$.Native.alert({text:("Y-m-d:" + data)});
            }
        });
    });
   
    var getDialList = [
                   {
                       id: '123',
                       columns: [
                           '刘诗诗',
                           '平安银行',
                           '****3458'
                       ]
                   },
                   {
                       id: '234',
                       columns: [
                           '刘诗诗',
                           '平安银行',
                           '****3458'
                       ]
                   },
                   {
                       id: '345',
                       columns: [
                           '刘诗诗',
                           '平安银行',
                           '****3458'
                       ]
                   }
                 ]
   $('#openDetail').on('tap', function () {
        console.log("openDetail");
        $$.Native.getDial({ 
            data:getDialList,            
            defaultId : "123",
            leftBtnText:"添加信用卡",
            leftBtnCallback: function(data){
              $$.Native.tip("调用成功 ");
            },
            changeCallback : function(data){
                $$.Native.alert({text:"changeCallback:" + data});
            },
            completeText:"确定确定",
            completeCallback : function(data){
               $$.Native.alert({text:("completeCallback:" + data)});
            }
        });
    });
</script>
</body>
</html>